import { Upload } from "@/api/interface/index";
/* import { PORT1 } from "@/api/config/servicePort"; */
let PORT1='/api'
import http from "@/api";

/**
 * @name 文件上传模块
 */
// 图片上传
export const uploadImg = (params: FormData) => {
  return http.post<Upload.ResFileUrl>(`/protable/upload/img`, params);
};

// 视频上传
export const uploadVideo = (params: FormData) => {
  return http.post<Upload.ResFileUrl>(PORT1 + `/file/upload/video`, params);
};

// 大文件上传前检查
export const checkFile = (params: any) => {
  return http.post<Upload.ResFileUrl>(`/checkfile`, params);
};

// 大文件上传
export const uploadFile = (params: any,onUploadProgress:any) => {
  return http.post<Upload.ResFileUrl>(`/uploadfile`, params,onUploadProgress);
};

// 大文件整合
export const mergerFile = (params: any) => {
  return http.post<Upload.ResFileUrl>(`/mergefile`, params);
};